<template>
	<view class="container">
		<u-navbar title="发布内容">
			<view slot="right" class="publish-btn">
				<text>发布</text>
			</view>
		</u-navbar>
		<view class="ringcontent">
			<textarea value="" placeholder="记录生活..." maxlength="200" auto-height="true"/>
			<view class="upload-view">
				<u-upload></u-upload>
			</view>
			<view class="my-location">
				<view class="my-location-left">
					<u-icon name="map" size="40"></u-icon>
					<text>所在位置</text>
				</view>
				<view class="my-location-right">
					<text v-if="getLocationText==''">正在定位...</text>
					<text v-else>{{getLocationText}}</text>
					<u-icon name="/static/icon_zy_189.png" size="15"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				getLocationText:''
			}
		},
		created() {
			uni.getLocation({
				type:'gcj02',
				altitude:true,
				geocode:true,
				success:(res_locationinfo)=>{
					console.log(res_locationinfo);
					this.ggetLocationText=res_locationinfo.address.city;
				},
			});
		},
		onLoad() {
			
		},
		methods: {
			
		},
		computed:{
			
		}
	}
</script>

<style lang="scss">
     page{
		 width: 100%;
		 height: 100%;
	 }
	 .container{
		 width: 100%;
		 height: 100%;
		 .publish-btn{
			 border-radius: 10rpx;
			 background-color: rgba(14, 174, 100, 1);
			 color: #FFFFFF;
			 font-size: 14px;
			 width: 50px;
			 display: flex;
			 align-items: center;
			 justify-content: center;
			 height: 30px;
		 }
		 .ringcontent{
			 width: 680rpx;
			 height: auto;
			 margin: auto;
			 textarea{
				 font-size: 27rpx;
				 width: 660rpx;
				 padding-left: 10rpx;
				 padding-right: 10rpx;
			 }
			 .upload-view{
				 width: 100%;
				 height: auto;
				 margin-top: 80rpx;
			 }
			 margin-top: 50rpx;
			 .my-location{
				 width: 100%;
				 display: flex;
				 justify-content: space-between;
				 align-items: center;
				 padding-bottom: 15rpx;
				 border-bottom: 1rpx solid #F1F1F1;
				 margin-top: 100rpx;
				 view{display: flex;align-items: center;color: rgba(136, 136, 136, 1);}
				 .my-location-right{
					 text{margin-right: 10rpx;}
				 }
				 .my-location-left{
					 text{margin-left: 10rpx;}
				 }
			 }
		 }
	 }
</style>
